import 'dart:convert';
import 'dart:ui';

import 'package:cached_network_image/cached_network_image.dart';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_easyrefresh/material_header.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:panda/address/MyAddress.dart';
import 'package:panda/base/Constant.dart';
import 'package:panda/base/SignType.dart';
import 'package:panda/base/application.dart';
import 'package:panda/event/UserInfoEvent.dart';
import 'package:panda/goods/UserUpdateGoodsList.dart';
import 'package:panda/http/Api.dart';
import 'package:panda/http/HttpUtil.dart';
import 'package:panda/jiayouzhan/KefuTalk.dart';
import 'package:panda/order/OrderPage.dart';
import 'package:panda/order/OrderPage2.dart';
import 'package:panda/order/OrderPageVip.dart';
import 'package:panda/set/DianPuYeJi.dart';
import 'package:panda/set/InformNews.dart';
import 'package:panda/set/InformNews2.dart';
import 'package:panda/set/InviteFriend.dart';
import 'package:panda/set/InviteFriend2.dart';
import 'package:panda/set/JinShenShenHe.dart';
import 'package:panda/set/MyCoupon.dart';
import 'package:panda/set/MyShouRu.dart';
import 'package:panda/set/MyTeamMarket.dart';
import 'package:panda/set/MyYue.dart';
import 'package:panda/set/SocreRecharge.dart';
import 'package:panda/set/SystemSet.dart';
import 'package:panda/util/AppSaveInfoUtil.dart';
import 'package:panda/util/SignUtil.dart';

class MinePage extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return MineFragmentState();
  }
}

class MineFragmentState extends State<MinePage> with WidgetsBindingObserver {
  EasyRefreshController _controller = new EasyRefreshController();
  String group_name = "", userName = "", avatar;
  String token = "",
      code = "888888",
      phone = "",
      uid = "",
      is_recharge = "N",
      is_upgrade = "N";
  String num1 = "",
      num2 = "",
      num3 = "",
      num4 = "",
      num5 = "",
      num6 = "",
      num7 = "",
      num8 = "",
      num9 = "",
      num10 = "",
      num11 = "",
      num12 = "",
      allbalance = "0.00";
  @override
  void didChangeAppLifecycleState(AppLifecycleState state) {
    // TODO: implement didChangeAppLifecycleState
    super.didChangeAppLifecycleState(state);
    if (state == AppLifecycleState.resumed) {
      getString(TOKEN).then((value) {
        token = value;
        if (token != null) getUserInfo();
      });
    }
  }

  @override
  void initState() {
    super.initState();
    WidgetsBinding.instance.addObserver(this);
    APPLIC.eventBus.on<UserInfoEvent>().listen((event) {
      group_name = event.user['user_msg']['group_name'];
      userName = event.user['user_detail']['nickname'] == null
          ? event.user['user_msg']['phone']
          : event.user['user_detail']['nickname'];
      phone = event.user['user_msg']['phone'];
      avatar = event.user['user_detail']['avatar'];
      uid = event.user['user_msg']['uid'].toString();
      num9 = event.user['user_msg']['balance'] == null
          ? "0"
          : event.user['user_msg']['balance'].toString();
      code = event.user['user_msg']['auth_code'];
      setState(() {});
      getString(TOKEN).then((value) {
        token = value;
        if (token != null) loadData();
      });
    });
    getString(TOKEN).then((value) {
      token = value;
      if (token != null) {
        getUserInfo();
        loadData();
      }
    });
    checkVersion();
  }

  checkVersion() async {
    Map map = new Map();
    map['sign_type'] = SignType.CHECK_VERSION;
    Response<String> response =
        await HttpUtil().post(Api.VERSION_CHECK, data: getSign(map));
    Map userMap = json.decode(response.data);
    if (userMap['code'] == 1 && mounted) {
      is_recharge = userMap['data']['is_recharge'].toString();
      is_upgrade = userMap['data']['is_upgrade'].toString();
      setState(() {});
    }
  }

  loadData() async {
    Map map = new Map();
    map['token'] = token;
    Response<String> response = await HttpUtil().post(
        Api.BaseUrl + "/index.php/wap/User/getMyProfit",
        data: getSign(map));
    Map userMap = json.decode(response.data);
    if (userMap['code'] != 1) {
      Fluttertoast.showToast(msg: userMap['msg']);
      return;
    }

    if (mounted)
      setState(() {
        allbalance = userMap['data']['allbalance'].toString();
      });
  }

  getTuiguang() async {
    Map map = new Map();
    map['token'] = token;
    map['sign_type'] = SignType.GET_USER_TUIGUANG;
    Response<String> response =
        await HttpUtil().post(Api.GET_USER_TUIGUANG, data: getSign(map));
    Map userMap = json.decode(response.data);
    if (userMap['code'] == 1 && mounted) {
      num1 = userMap['data']['balance']['balance'].toString();
      num2 = userMap['data']['balance']['cash_out_balance'].toString();
      num3 = userMap['data']['balance']['all_balance'].toString();
      num4 = userMap['data']['point']['point'].toString();
      num5 = userMap['data']['point']['cash_out_point'].toString();
      num6 = userMap['data']['point']['all_point'].toString();
      num7 = userMap['data']['order']['today'].toString();
      num8 = userMap['data']['order']['month'].toString();
      num9 = userMap['data']['order']['month_allprice'].toString();
      num10 = userMap['data']['profit']['allprofit'].toString();
      num11 = userMap['data']['profit']['m_profit'].toString();
      num12 = userMap['data']['profit']['y_profit'].toString();
      setState(() {});
    }
  }

  getUserInfo() async {
    Map map = new Map();
    map['token'] = token;
    map['sign_type'] = SignType.GET_USERINFO;
    Response<String> response =
        await HttpUtil().post(Api.GET_USERINFO, data: getSign(map));
    Map userMap = json.decode(response == null ? "" : response.data);
    if (userMap['code'] == 1 && mounted) {
      setState(() {
        APPLIC.userInfoMap = userMap['data'];
        userMap = userMap['data'];
        group_name = userMap['user_msg']['group_name'];
        userName = userMap['user_detail']['nickname'] == null
            ? userMap['user_msg']['phone']
            : userMap['user_detail']['nickname'];
        num9 = userMap['user_msg']['balance'] == null
            ? "0"
            : userMap['user_msg']['balance'].toString();
        avatar = userMap['user_detail']['avatar'];
        code = userMap['user_msg']['auth_code'];
        uid = userMap['user_msg']['uid'].toString();
      });
    }
  }

  @override
  Widget build(BuildContext context) {
    ScreenUtil.instance = ScreenUtil(width: 750, height: 1334)..init(context);
    return new Scaffold(
      body: AnnotatedRegion<SystemUiOverlayStyle>(
        value: SystemUiOverlayStyle.light,
        child: new EasyRefresh(
          header: MaterialHeader(),
          controller: _controller,
          onRefresh: () {
            getUserInfo();
            loadData();
          },
          child: new Container(
            child: Column(
              children: <Widget>[
                Stack(
                  children: <Widget>[
                    Container(
                      width: double.infinity,
                      height: ScreenUtil.getInstance().setHeight(DP_250 + 25),
                      decoration: BoxDecoration(
                        image: DecorationImage(
                            image: AssetImage('images/bg_personal_top.png'),
                            fit: BoxFit.cover),
                      ),
                    ),
                    Container(
                      margin: EdgeInsets.fromLTRB(
                          ScreenUtil.getInstance().setHeight(DP_30),
                          MediaQueryData.fromWindow(window).padding.top +
                              ScreenUtil.getInstance().setHeight(DP_20),
                          ScreenUtil.getInstance().setHeight(DP_30),
                          ScreenUtil.getInstance().setHeight(DP_30)),
                      child: Row(
                        mainAxisAlignment: MainAxisAlignment.end,
                        crossAxisAlignment: CrossAxisAlignment.center,
                        children: <Widget>[
                          GestureDetector(
                            behavior: HitTestBehavior.opaque,
                            child: Icon(
                              Icons.settings,
                              color: Colors.white,
                            ),
                            onTap: () {
                              Navigator.of(context).push(
                                  new MaterialPageRoute(builder: (context) {
                                return new SystemPage();
                              }));
                            },
                          ),
                          Container(
                            width: DP_15,
                          ),
                          GestureDetector(
                            behavior: HitTestBehavior.opaque,
                            onTap: () {
                              Navigator.of(context).push(
                                  new MaterialPageRoute(builder: (context) {
                                return new InformNewsPage();
                              }));
                            },
                            child: Icon(
                              Icons.message,
                              color: Colors.white,
                            ),
                          )
                        ],
                      ),
                    ),
                    Container(
                      padding: EdgeInsets.fromLTRB(
                          ScreenUtil.getInstance().setHeight(DP_10),
                          ScreenUtil.getInstance().setHeight(DP_30),
                          0,
                          ScreenUtil.getInstance().setHeight(0)),
                      margin: EdgeInsets.fromLTRB(
                          ScreenUtil.getInstance().setHeight(DP_10),
                          MediaQueryData.fromWindow(window).padding.top +
                              ScreenUtil.getInstance().setHeight(DP_20),
                          0,
                          ScreenUtil.getInstance().setHeight(0)),
                      // decoration: BoxDecoration(
                      //     color: white,
                      //     borderRadius: BorderRadius.circular(
                      //         ScreenUtil.getInstance().setHeight(DP_20))),
                      child: Column(
                        children: <Widget>[
                          Row(
                            crossAxisAlignment: CrossAxisAlignment.center,
                            mainAxisAlignment: MainAxisAlignment.center,
                            children: <Widget>[
                              GestureDetector(
                                behavior: HitTestBehavior.opaque,
                                child: ClipOval(
                                  child: avatar == null
                                      ? Image.asset(
                                          "images/app_icon.png",
                                          fit: BoxFit.cover,
                                          width: ScreenUtil.getInstance()
                                              .setWidth(DP_120),
                                          height: ScreenUtil.getInstance()
                                              .setWidth(DP_120),
                                        )
                                      : CachedNetworkImage(
                                          imageUrl: avatar,
                                          fit: BoxFit.cover,
                                          width: ScreenUtil.getInstance()
                                              .setWidth(DP_120),
                                          height: ScreenUtil.getInstance()
                                              .setWidth(DP_120),
                                        ),
                                ),
                                onTap: () {
                                  Navigator.of(context).push(
                                      new MaterialPageRoute(builder: (context) {
                                    return new SystemPage();
                                  }));
                                },
                              ),
                              Container(
                                width: DP_15,
                              ),
                              Column(
                                crossAxisAlignment: CrossAxisAlignment.start,
                                children: <Widget>[
                                  Row(children: <Widget>[
                                    Text(userName,
                                        style: TextStyle(
                                            fontSize: ScreenUtil.getInstance()
                                                .setSp(NORMAL_FONT_SIZE + 3),
                                            color: Colors.white)),
                                    Container(width: 8),
                                    GestureDetector(
                                      behavior: HitTestBehavior.opaque,
                                      onTap: () {
                                        // Navigator.of(context).push(
                                        //     new MaterialPageRoute(
                                        //         builder: (context) {
                                        //   return new VipCenterPage(
                                        //     level: 1,
                                        //   );
                                        // }));
                                      },
                                      child: Container(
                                        // decoration: BoxDecoration(
                                        //     borderRadius:
                                        //         BorderRadius.circular(2),
                                        //     border: Border.all(
                                        //         color: white, width: 1)),
                                        padding: EdgeInsets.fromLTRB(
                                            ScreenUtil.getInstance()
                                                .setHeight(DP_8),
                                            0,
                                            ScreenUtil.getInstance()
                                                .setHeight(DP_8),
                                            0),
                                        margin: EdgeInsets.fromLTRB(
                                            0,
                                            0,
                                            ScreenUtil.getInstance()
                                                .setHeight(DP_10),
                                            0),
                                        child: Text(
                                          group_name,
                                          style: TextStyle(
                                              fontSize: ScreenUtil.getInstance()
                                                  .setSp(SMALL_FONT_SIZE),
                                              color: white),
                                        ),
                                      ),
                                    ),
                                    // Container(width: 8),
                                    // GestureDetector(
                                    //   behavior: HitTestBehavior.opaque,
                                    //   child: Icon(
                                    //     Icons.settings,
                                    //     color: Colors.white,
                                    //   ),
                                    //   onTap: () {
                                    //     Navigator.of(context).push(
                                    //         new MaterialPageRoute(
                                    //             builder: (context) {
                                    //       return new SystemPage();
                                    //     }));
                                    //   },
                                    // ),
                                  ]),
                                  Container(
                                    height: 5,
                                  ),
                                  GestureDetector(
                                    child: Row(
                                      crossAxisAlignment:
                                          CrossAxisAlignment.center,
                                      children: <Widget>[
                                        Text('会员ID: ',
                                            style: TextStyle(
                                                fontSize:
                                                    ScreenUtil.getInstance()
                                                        .setSp(
                                                            NORMAL_FONT_SIZE -
                                                                5),
                                                color: Colors.white)),
                                        // Container(width: 5),
                                        // Text(
                                        //   '$code',
                                        //   style: TextStyle(
                                        //       fontSize: ScreenUtil.getInstance()
                                        //           .setSp(NORMAL_FONT_SIZE),
                                        //       color: mainColor),
                                        // ),
                                        // Icon(Icons.content_copy,
                                        //     size: 16, color: Colors.black45),
                                        // Container(width: 5),
                                        Text('A$uid',
                                            style: TextStyle(
                                                fontSize:
                                                    ScreenUtil.getInstance()
                                                        .setSp(
                                                            NORMAL_FONT_SIZE -
                                                                2),
                                                color: Colors.white)),
                                      ],
                                    ),
                                    onTap: () {
                                      // ClipboardData data =
                                      //     new ClipboardData(text: code);
                                      // Clipboard.setData(data);
                                      // Fluttertoast.showToast(msg: "复制成功");
                                    },
                                    behavior: HitTestBehavior.opaque,
                                  )
                                ],
                              ),
                              Expanded(
                                child: Center(),
                              ),
                              Offstage(
                                  child: GestureDetector(
                                    behavior: HitTestBehavior.opaque,
                                    onTap: () {
                                      Navigator.of(context).push(
                                          new MaterialPageRoute(
                                              builder: (context) {
                                        return new MyYuePage();
                                      }));
                                    },
                                    child: Column(
                                      children: <Widget>[
                                        Text('余额',
                                            style: TextStyle(
                                                fontSize:
                                                    ScreenUtil.getInstance()
                                                        .setSp(
                                                            NORMAL_FONT_SIZE -
                                                                4),
                                                color: Colors.white)),
                                        Text(num9,
                                            style: TextStyle(
                                                fontSize:
                                                    ScreenUtil.getInstance()
                                                        .setSp(
                                                            NORMAL_FONT_SIZE +
                                                                3),
                                                color: Colors.white))
                                      ],
                                    ),
                                  ),
                                  offstage: APPLIC.userInfoMap != null &&
                                      APPLIC.userInfoMap['user_msg']
                                              ['group_id'] !=
                                          1),
                              Container(width: 25),
                            ],
                          ),
                          Container(
                              height:
                                  ScreenUtil.getInstance().setHeight(DP_20)),
                          Container(
                              child: Row(
                                mainAxisAlignment: MainAxisAlignment.end,
                                children: <Widget>[
                                  ClipOval(
                                      child: Image.asset('images/app_icon.png',
                                          width: ScreenUtil.getInstance()
                                              .setHeight(35),
                                          height: ScreenUtil.getInstance()
                                              .setHeight(35))),
                                  Container(width: 5),
                                  GestureDetector(
                                      onTap: () {
                                        if (APPLIC.userInfoMap == null) {
                                          return;
                                        }
                                        Navigator.of(context).push(
                                            new MaterialPageRoute(
                                                builder: (context) {
                                          return new UserUpdateListPage();
                                        }));
                                      },
                                      behavior: HitTestBehavior.opaque,
                                      child: Text('成为店长',
                                          style: TextStyle(
                                              color: white,
                                              fontSize: ScreenUtil.getInstance()
                                                  .setSp(SMALL_FONT_SIZE)))),
                                  Container(width: 5),
                                  Icon(Icons.arrow_forward_ios,
                                      color: white, size: 15),
                                  Expanded(child: Center()),
                                  Offstage(
                                    offstage: phone == '15161177235',
                                    child: ClipOval(
                                        child: Image.asset(
                                            'images/app_icon.png',
                                            width: ScreenUtil.getInstance()
                                                .setHeight(35),
                                            height: ScreenUtil.getInstance()
                                                .setHeight(35))),
                                  ),
                                  Container(width: 5),
                                  Offstage(
                                    offstage: phone == '15161177235',
                                    child: GestureDetector(
                                      child: Text('邀请好友',
                                          style: TextStyle(
                                              color: white,
                                              fontSize: ScreenUtil.getInstance()
                                                  .setSp(SMALL_FONT_SIZE))),
                                      onTap: () {
                                        if (APPLIC.userInfoMap == null) {
                                          return;
                                        }
                                        if (APPLIC.userInfoMap['user_msg']
                                                ['group_id'] <
                                            2) {
                                          Fluttertoast.showToast(
                                              msg: "请先成为店长",
                                              gravity: ToastGravity.CENTER);
                                          Navigator.of(context).push(
                                              new MaterialPageRoute(
                                                  builder: (context) {
                                            return new UserUpdateListPage();
                                          }));
                                          return;
                                        }
                                        Navigator.of(context).push(
                                            new MaterialPageRoute(
                                                builder: (context) {
                                          return new InviteFriendPage();
                                        }));
                                      },
                                      behavior: HitTestBehavior.opaque,
                                    ),
                                  ),
                                  Container(width: 5),
                                  Offstage(
                                      offstage: phone == '15161177235',
                                      child: Icon(Icons.arrow_forward_ios,
                                          color: white, size: 15)),
                                ],
                              ),
                              width: double.infinity,
                              padding: EdgeInsets.all(10),
                              decoration: BoxDecoration(
                                  color: black,
                                  borderRadius: BorderRadius.only(
                                      topLeft: Radius.circular(10),
                                      topRight: Radius.circular(10))),
                              margin: EdgeInsets.only(
                                  left: ScreenUtil.getInstance().setHeight(0),
                                  right: ScreenUtil.getInstance()
                                      .setHeight(DP_20))),
                          Offstage(
                            offstage: APPLIC.userInfoMap == null ||
                                APPLIC.userInfoMap['user_msg']['group_id'] == 1,
                            child: Container(
                              decoration: BoxDecoration(
                                  color: white,
                                  borderRadius: BorderRadius.circular(10)),
                              margin: EdgeInsets.fromLTRB(
                                  0,
                                  10,
                                  ScreenUtil.getInstance().setHeight(DP_20),
                                  ScreenUtil.getInstance().setHeight(DP_10)),
                              padding: EdgeInsets.fromLTRB(
                                  ScreenUtil.getInstance().setHeight(20),
                                  ScreenUtil.getInstance().setHeight(DP_20),
                                  ScreenUtil.getInstance().setHeight(DP_30),
                                  ScreenUtil.getInstance().setHeight(DP_20)),
                              child: Column(
                                children: <Widget>[
                                  Row(
                                    children: <Widget>[
                                      Expanded(
                                        child: Text('我的收益',
                                            style: TextStyle(
                                                color: black,
                                                fontSize:
                                                    ScreenUtil.getInstance()
                                                        .setSp(
                                                            NORMAL_FONT_SIZE))),
                                      ),
                                    ],
                                  ),
                                  Container(
                                      height: ScreenUtil.getInstance()
                                          .setHeight(DP_20)),
                                  Row(
                                    children: <Widget>[
                                      Expanded(
                                        child: GestureDetector(
                                          behavior: HitTestBehavior.opaque,
                                          onTap: () {
                                            Navigator.of(context).push(
                                                new MaterialPageRoute(
                                                    builder: (context) {
                                              return new MyShouRuPage();
                                            }));
                                          },
                                          child: Center(
                                            child: Column(
                                              children: <Widget>[
                                                Text("$allbalance",
                                                    style: TextStyle(
                                                        fontSize: ScreenUtil
                                                                .getInstance()
                                                            .setSp(
                                                                BIG_FONT_SIZE),
                                                        color: black)),
                                                Container(
                                                  height:
                                                      ScreenUtil.getInstance()
                                                          .setHeight(5),
                                                ),
                                                Text('总收入(元)',
                                                    style: TextStyle(
                                                        fontSize: ScreenUtil
                                                                .getInstance()
                                                            .setSp(
                                                                SMALL_FONT_SIZE),
                                                        color: black_99)),
                                              ],
                                            ),
                                          ),
                                        ),
                                      ),
                                      Expanded(
                                        child: GestureDetector(
                                          behavior: HitTestBehavior.opaque,
                                          child: Center(
                                            child: Column(
                                              children: <Widget>[
                                                Text(num9,
                                                    style: TextStyle(
                                                        fontSize: ScreenUtil
                                                                .getInstance()
                                                            .setSp(
                                                                BIG_FONT_SIZE),
                                                        color: black)),
                                                Container(
                                                  height:
                                                      ScreenUtil.getInstance()
                                                          .setHeight(5),
                                                ),
                                                Text('余额(元)',
                                                    style: TextStyle(
                                                        fontSize: ScreenUtil
                                                                .getInstance()
                                                            .setSp(
                                                                SMALL_FONT_SIZE),
                                                        color: black_99)),
                                              ],
                                            ),
                                          ),
                                          onTap: () {
                                            Navigator.of(context).push(
                                                new MaterialPageRoute(
                                                    builder: (context) {
                                              return new MyYuePage();
                                            }));
                                          },
                                        ),
                                      ),
                                    ],
                                  )
                                ],
                              ),
                            ),
                          ),
                          Container(
                              height: ScreenUtil.getInstance().setHeight(DP_8)),
                          Offstage(
                            offstage: APPLIC.userInfoMap == null ||
                                APPLIC.userInfoMap['user_msg']['group_id'] == 1,
                            child: Container(
                              decoration: BoxDecoration(
                                  color: white,
                                  borderRadius: BorderRadius.circular(10)),
                              margin: EdgeInsets.fromLTRB(
                                  0,
                                  0,
                                  ScreenUtil.getInstance().setHeight(DP_20),
                                  ScreenUtil.getInstance().setHeight(DP_10)),
                              padding: EdgeInsets.fromLTRB(
                                  ScreenUtil.getInstance().setHeight(20),
                                  ScreenUtil.getInstance().setHeight(DP_20),
                                  ScreenUtil.getInstance().setHeight(DP_30),
                                  ScreenUtil.getInstance().setHeight(DP_20)),
                              child: Column(
                                children: <Widget>[
                                  Row(
                                    children: <Widget>[
                                      Expanded(
                                        child: Text('我的店铺',
                                            style: TextStyle(
                                                color: black,
                                                fontSize:
                                                    ScreenUtil.getInstance()
                                                        .setSp(
                                                            NORMAL_FONT_SIZE))),
                                      ),
                                      // GestureDetector(
                                      //   onTap: () {
                                      //     Navigator.of(context).push(
                                      //         new MaterialPageRoute(
                                      //             builder: (context) {
                                      //       return new ScoreRecordPage();
                                      //     }));
                                      //   },
                                      //   child: Text('更多 >',
                                      //       style: TextStyle(
                                      //           color: Colors.black45,
                                      //           fontSize: ScreenUtil.getInstance()
                                      //               .setSp(SMALL_FONT_SIZE))),
                                      // )
                                    ],
                                  ),
                                  Container(
                                      height: ScreenUtil.getInstance()
                                          .setHeight(DP_20)),
                                  Row(
                                    children: <Widget>[
                                      Expanded(
                                        child: GestureDetector(
                                          behavior: HitTestBehavior.opaque,
                                          onTap: () {
                                            Navigator.of(context).push(
                                                new MaterialPageRoute(
                                                    builder: (context) {
                                              return new TeamMarketPage();
                                            }));
                                          },
                                          child: Center(
                                            child: Column(
                                              children: <Widget>[
                                                Image.asset(
                                                    "images/icon_shop_a.png",
                                                    width: 22,
                                                    height: 22),
                                                Container(
                                                  height:
                                                      ScreenUtil.getInstance()
                                                          .setHeight(5),
                                                ),
                                                Text('客户管理',
                                                    style: TextStyle(
                                                        fontSize: ScreenUtil
                                                                .getInstance()
                                                            .setSp(
                                                                SMALL_FONT_SIZE),
                                                        color: black_99)),
                                              ],
                                            ),
                                          ),
                                        ),
                                      ),
                                      Expanded(
                                        child: new GestureDetector(
                                          behavior: HitTestBehavior.opaque,
                                          child: Center(
                                            child: Column(
                                              children: <Widget>[
                                                Image.asset(
                                                    "images/icon_shop_b.png",
                                                    width: 22,
                                                    height: 22),
                                                Container(
                                                  height:
                                                      ScreenUtil.getInstance()
                                                          .setHeight(5),
                                                ),
                                                Text('店铺业绩',
                                                    style: TextStyle(
                                                        fontSize: ScreenUtil
                                                                .getInstance()
                                                            .setSp(
                                                                SMALL_FONT_SIZE),
                                                        color: black_99)),
                                              ],
                                            ),
                                          ),
                                          onTap: () {
                                            Navigator.of(context).push(
                                                new MaterialPageRoute(
                                                    builder: (context) {
                                              return new DianPuYejiPage();
                                            }));
                                          },
                                        ),
                                      ),
                                      // Expanded(
                                      //   child: GestureDetector(
                                      //     behavior: HitTestBehavior.opaque,
                                      //     child: Center(
                                      //       child: Column(
                                      //         children: <Widget>[
                                      //           Text(num5,
                                      //               style: TextStyle(
                                      //                   fontSize: ScreenUtil
                                      //                           .getInstance()
                                      //                       .setSp(BIG_FONT_SIZE),
                                      //                   color: Colors.black87)),
                                      //           Container(
                                      //             height: ScreenUtil.getInstance()
                                      //                 .setHeight(5),
                                      //           ),
                                      //           Text('待结算积分',
                                      //               style: TextStyle(
                                      //                   fontSize: ScreenUtil
                                      //                           .getInstance()
                                      //                       .setSp(
                                      //                           SMALL_FONT_SIZE),
                                      //                   color: black_99)),
                                      //         ],
                                      //       ),
                                      //     ),
                                      //     onTap: () {
                                      //       // Navigator.of(context).push(
                                      //       //     new MaterialPageRoute(
                                      //       //         builder: (context) {
                                      //       //   return new TeamMarketPage();
                                      //       // }));
                                      //     },
                                      //   ),
                                      // ),
                                    ],
                                  )
                                ],
                              ),
                            ),
                          ),
                          Container(
                              height: ScreenUtil.getInstance().setHeight(DP_8)),
                          // Container(
                          //   decoration: BoxDecoration(
                          //       color: white,
                          //       borderRadius: BorderRadius.circular(10)),
                          //   margin: EdgeInsets.fromLTRB(
                          //       0,
                          //       0,
                          //       ScreenUtil.getInstance().setHeight(DP_20),
                          //       ScreenUtil.getInstance().setHeight(DP_10)),
                          //   padding: EdgeInsets.fromLTRB(
                          //       ScreenUtil.getInstance().setHeight(DP_30),
                          //       ScreenUtil.getInstance().setHeight(DP_20),
                          //       ScreenUtil.getInstance().setHeight(DP_30),
                          //       ScreenUtil.getInstance().setHeight(DP_20)),
                          //   child: Column(
                          //     children: <Widget>[
                          //       Row(
                          //         children: <Widget>[
                          //           Expanded(
                          //             child: Text('我的推广',
                          //                 style: TextStyle(
                          //                     color: black,
                          //                     fontSize: ScreenUtil.getInstance()
                          //                         .setSp(NORMAL_FONT_SIZE))),
                          //           ),
                          //           GestureDetector(
                          //               child: Text('更多 >',
                          //                   style: TextStyle(
                          //                       color: Colors.black45,
                          //                       fontSize:
                          //                           ScreenUtil.getInstance()
                          //                               .setSp(
                          //                                   SMALL_FONT_SIZE))),
                          //               onTap: () {
                          //                 Navigator.of(context).push(
                          //                     new MaterialPageRoute(
                          //                         builder: (context) {
                          //                   return new TuiGuangShouYiPage();
                          //                 }));
                          //               })
                          //         ],
                          //       ),
                          //       Container(
                          //           height: ScreenUtil.getInstance()
                          //               .setHeight(DP_20)),
                          //       Row(
                          //         children: <Widget>[
                          //           Expanded(
                          //             child: GestureDetector(
                          //               behavior: HitTestBehavior.opaque,
                          //               onTap: () {
                          //                 // Navigator.of(context).push(
                          //                 //     new MaterialPageRoute(
                          //                 //         builder: (context) {
                          //                 //   return new MyAddressPage(
                          //                 //     type: 0,
                          //                 //   );
                          //                 // }));
                          //               },
                          //               child: Center(
                          //                 child: Column(
                          //                   children: <Widget>[
                          //                     Text(num3,
                          //                         style: TextStyle(
                          //                             fontSize: ScreenUtil
                          //                                     .getInstance()
                          //                                 .setSp(BIG_FONT_SIZE),
                          //                             color: mainColor)),
                          //                     Container(
                          //                       height: ScreenUtil.getInstance()
                          //                           .setHeight(5),
                          //                     ),
                          //                     Text('总推广',
                          //                         style: TextStyle(
                          //                             fontSize: ScreenUtil
                          //                                     .getInstance()
                          //                                 .setSp(
                          //                                     SMALL_FONT_SIZE),
                          //                             color: black_99)),
                          //                   ],
                          //                 ),
                          //               ),
                          //             ),
                          //           ),
                          //           Expanded(
                          //             child: new GestureDetector(
                          //               behavior: HitTestBehavior.opaque,
                          //               child: Center(
                          //                 child: Column(
                          //                   children: <Widget>[
                          //                     Text(num1,
                          //                         style: TextStyle(
                          //                             fontSize: ScreenUtil
                          //                                     .getInstance()
                          //                                 .setSp(BIG_FONT_SIZE),
                          //                             color: Colors.black87)),
                          //                     Container(
                          //                       height: ScreenUtil.getInstance()
                          //                           .setHeight(5),
                          //                     ),
                          //                     Text('已提现',
                          //                         style: TextStyle(
                          //                             fontSize: ScreenUtil
                          //                                     .getInstance()
                          //                                 .setSp(
                          //                                     SMALL_FONT_SIZE),
                          //                             color: black_99)),
                          //                   ],
                          //                 ),
                          //               ),
                          //               onTap: () {
                          //                 // Navigator.of(context).push(
                          //                 //     new MaterialPageRoute(
                          //                 //         builder: (context) {
                          //                 //   return new MyCollectGoodsPage();
                          //                 // }));
                          //               },
                          //             ),
                          //           ),
                          //           Expanded(
                          //             child: GestureDetector(
                          //               behavior: HitTestBehavior.opaque,
                          //               child: Center(
                          //                 child: Column(
                          //                   children: <Widget>[
                          //                     Text(num2,
                          //                         style: TextStyle(
                          //                             fontSize: ScreenUtil
                          //                                     .getInstance()
                          //                                 .setSp(BIG_FONT_SIZE),
                          //                             color: Colors.black87)),
                          //                     Container(
                          //                       height: ScreenUtil.getInstance()
                          //                           .setHeight(5),
                          //                     ),
                          //                     Text('未提现',
                          //                         style: TextStyle(
                          //                             fontSize: ScreenUtil
                          //                                     .getInstance()
                          //                                 .setSp(
                          //                                     SMALL_FONT_SIZE),
                          //                             color: black_99)),
                          //                   ],
                          //                 ),
                          //               ),
                          //               onTap: () {
                          //                 // Navigator.of(context).push(
                          //                 //     new MaterialPageRoute(
                          //                 //         builder: (context) {
                          //                 //   return new TeamMarketPage();
                          //                 // }));
                          //               },
                          //             ),
                          //           ),
                          //         ],
                          //       )
                          //     ],
                          //   ),
                          // ),
                        ],
                      ),
                    ),
                  ],
                ),
                Container(
                  padding:
                      EdgeInsets.all(ScreenUtil.getInstance().setWidth(DP_20)),
                  width: double.infinity,
                  margin: EdgeInsets.fromLTRB(
                      ScreenUtil.getInstance().setWidth(DP_20),
                      0,
                      ScreenUtil.getInstance().setWidth(DP_20),
                      ScreenUtil.getInstance().setWidth(DP_20)),
                  decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(DP_10),
                      color: Colors.white),
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: <Widget>[
                      Text('我的订单',
                          style: TextStyle(
                              fontSize: ScreenUtil.getInstance()
                                  .setSp(NORMAL_FONT_SIZE),
                              color: Colors.black)),
                      Container(
                          height: ScreenUtil.getInstance().setHeight(DP_15)),
                      Container(
                        height: 1,
                        color: f0Color,
                      ),
                      Container(
                        padding: EdgeInsets.fromLTRB(
                            ScreenUtil.getInstance().setWidth(0),
                            ScreenUtil.getInstance().setWidth(15),
                            ScreenUtil.getInstance().setWidth(0),
                            ScreenUtil.getInstance().setWidth(0)),
                        decoration: BoxDecoration(
                            borderRadius: BorderRadius.circular(DP_10),
                            color: Colors.white),
                        child: Row(
                          children: <Widget>[
                            Expanded(
                              child: GestureDetector(
                                child: Center(
                                    child: Stack(
                                  children: <Widget>[
                                    Column(
                                      children: <Widget>[
                                        Container(
                                          height: ScreenUtil.getInstance()
                                              .setHeight(15),
                                        ),
                                        Image.asset("images/icon_order_a.png"),
                                        Container(
                                          height: ScreenUtil.getInstance()
                                              .setHeight(DP_10),
                                        ),
                                        Text('全部',
                                            style: TextStyle(
                                                fontSize:
                                                    ScreenUtil.getInstance()
                                                        .setSp(SMALL_FONT_SIZE),
                                                color: Colors.black87)),
                                      ],
                                    ),
                                  ],
                                )),
                                onTap: () {
                                  Navigator.of(context).push(
                                      new MaterialPageRoute(builder: (context) {
                                    return OrderPage(index: 0);
                                  }));
                                },
                                behavior: HitTestBehavior.opaque,
                              ),
                            ),
                            Expanded(
                              child: GestureDetector(
                                child: Center(
                                  child: Stack(
                                    children: <Widget>[
                                      Column(
                                        children: <Widget>[
                                          Container(
                                            height: ScreenUtil.getInstance()
                                                .setHeight(15),
                                          ),
                                          Image.asset(
                                              "images/icon_order_b.png"),
                                          Container(
                                            height: ScreenUtil.getInstance()
                                                .setHeight(DP_10),
                                          ),
                                          Text('待发货',
                                              style: TextStyle(
                                                  fontSize:
                                                      ScreenUtil.getInstance()
                                                          .setSp(
                                                              SMALL_FONT_SIZE),
                                                  color: Colors.black87)),
                                        ],
                                      ),
                                    ],
                                  ),
                                ),
                                onTap: () {
                                  Navigator.of(context).push(
                                      new MaterialPageRoute(builder: (context) {
                                    return OrderPage(index: 2);
                                  }));
                                },
                                behavior: HitTestBehavior.opaque,
                              ),
                            ),
                            Expanded(
                              child: GestureDetector(
                                child: Center(
                                  child: Stack(
                                    children: <Widget>[
                                      Column(
                                        children: <Widget>[
                                          Container(
                                            height: ScreenUtil.getInstance()
                                                .setHeight(15),
                                          ),
                                          Image.asset(
                                              "images/icon_order_c.png"),
                                          Container(
                                            height: ScreenUtil.getInstance()
                                                .setHeight(DP_10),
                                          ),
                                          Text('待收货',
                                              style: TextStyle(
                                                  fontSize:
                                                      ScreenUtil.getInstance()
                                                          .setSp(
                                                              SMALL_FONT_SIZE),
                                                  color: Colors.black87)),
                                        ],
                                      ),
                                    ],
                                  ),
                                ),
                                onTap: () {
                                  Navigator.of(context).push(
                                      new MaterialPageRoute(builder: (context) {
                                    return OrderPage(index: 3);
                                  }));
                                },
                                behavior: HitTestBehavior.opaque,
                              ),
                            ),
                            Expanded(
                              child: GestureDetector(
                                child: Center(
                                    child: Stack(
                                  children: <Widget>[
                                    Column(
                                      children: <Widget>[
                                        Container(
                                          height: ScreenUtil.getInstance()
                                              .setHeight(15),
                                        ),
                                        Image.asset("images/icon_order_d.png"),
                                        Container(
                                          height: ScreenUtil.getInstance()
                                              .setHeight(DP_10),
                                        ),
                                        Text('已完成',
                                            style: TextStyle(
                                                fontSize:
                                                    ScreenUtil.getInstance()
                                                        .setSp(SMALL_FONT_SIZE),
                                                color: Colors.black87)),
                                      ],
                                    ),
                                  ],
                                )),
                                onTap: () {
                                  Navigator.of(context).push(
                                      new MaterialPageRoute(builder: (context) {
                                    return OrderPage(index: 4);
                                  }));
                                },
                                behavior: HitTestBehavior.opaque,
                              ),
                            ),
                            Image.asset("images/separate.png"),
                            Expanded(
                              child: GestureDetector(
                                child: Center(
                                  child: Column(
                                    children: <Widget>[
                                      Container(
                                        height: ScreenUtil.getInstance()
                                            .setHeight(15),
                                      ),
                                      Image.asset(
                                          "images/icon_order_shouhou.png"),
                                      Container(
                                        height: ScreenUtil.getInstance()
                                            .setHeight(8),
                                      ),
                                      Text('售后',
                                          style: TextStyle(
                                              fontSize: ScreenUtil.getInstance()
                                                  .setSp(SMALL_FONT_SIZE),
                                              color: Colors.black87)),
                                    ],
                                  ),
                                ),
                                onTap: () {
                                  Navigator.of(context).push(
                                      new MaterialPageRoute(builder: (context) {
                                    return new Order2Page();
                                  }));
                                },
                                behavior: HitTestBehavior.opaque,
                              ),
                            ),
                          ],
                        ),
                      ),
                    ],
                  ),
                ),
                Container(
                  padding:
                      EdgeInsets.all(ScreenUtil.getInstance().setWidth(DP_20)),
                  width: double.infinity,
                  margin: EdgeInsets.fromLTRB(
                      ScreenUtil.getInstance().setWidth(DP_20),
                      0,
                      ScreenUtil.getInstance().setWidth(DP_20),
                      ScreenUtil.getInstance().setWidth(DP_20)),
                  decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(DP_10),
                      color: Colors.white),
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: <Widget>[
                      Text('常用工具',
                          style: TextStyle(
                              fontSize: ScreenUtil.getInstance()
                                  .setSp(NORMAL_FONT_SIZE),
                              color: Colors.black)),
                      Container(
                          height: ScreenUtil.getInstance().setHeight(DP_15)),
                      Container(
                        height: 1,
                        color: f0Color,
                      ),
                      Padding(
                        padding: EdgeInsets.fromLTRB(
                            0,
                            ScreenUtil.getInstance().setHeight(DP_30),
                            0,
                            ScreenUtil.getInstance().setHeight(DP_30)),
                        child: Row(
                          children: <Widget>[
                            Container(
                              width: is_recharge == "N"
                                  ? 0
                                  : (MediaQuery.of(context).size.width -
                                          ScreenUtil.getInstance()
                                              .setHeight(80)) /
                                      5,
                              child: Offstage(
                                child: GestureDetector(
                                  behavior: HitTestBehavior.opaque,
                                  onTap: () {
                                    if (APPLIC.userInfoMap['user_msg']
                                            ['group_id'] <
                                        2) {
                                      Fluttertoast.showToast(msg: "请先成为店长");
                                      Navigator.of(context).push(
                                          new MaterialPageRoute(
                                              builder: (context) {
                                        return new UserUpdateListPage();
                                      }));
                                      return;
                                    }
                                    Navigator.of(context).push(
                                        new MaterialPageRoute(
                                            builder: (context) {
                                      return new ScoreRechargePage();
                                    }));
                                  },
                                  child: Center(
                                    child: Column(
                                      children: <Widget>[
                                        Image.asset(
                                          "images/tool_a.png",
                                          scale: 1.3,
                                        ),
                                        Container(
                                          height: ScreenUtil.getInstance()
                                              .setHeight(DP_10),
                                        ),
                                        Text('积分中心',
                                            style: TextStyle(
                                                fontSize:
                                                    ScreenUtil.getInstance()
                                                        .setSp(SMALL_FONT_SIZE),
                                                color: Colors.black87)),
                                      ],
                                    ),
                                  ),
                                ),
                                offstage: is_recharge == "N",
                              ),
                            ),
                            Container(
                              width: is_upgrade == "N"
                                  ? 0
                                  : (MediaQuery.of(context).size.width -
                                          ScreenUtil.getInstance()
                                              .setHeight(80)) /
                                      5,
                              child: Offstage(
                                child: new GestureDetector(
                                  behavior: HitTestBehavior.opaque,
                                  child: Center(
                                    child: Column(
                                      children: <Widget>[
                                        Image.asset(
                                          "images/tool_d.png",
                                          scale: 1.3,
                                        ),
                                        Container(
                                          height: ScreenUtil.getInstance()
                                              .setHeight(DP_10),
                                        ),
                                        Text('晋升申请',
                                            style: TextStyle(
                                                fontSize:
                                                    ScreenUtil.getInstance()
                                                        .setSp(SMALL_FONT_SIZE),
                                                color: Colors.black87)),
                                      ],
                                    ),
                                  ),
                                  onTap: () {
                                    if (APPLIC.userInfoMap['user_msg']
                                            ['group_id'] <
                                        2) {
                                      Fluttertoast.showToast(msg: "请先成为店长");
                                      Navigator.of(context).push(
                                          new MaterialPageRoute(
                                              builder: (context) {
                                        return new UserUpdateListPage();
                                      }));
                                      return;
                                    }
                                    Navigator.of(context).push(
                                        new MaterialPageRoute(
                                            builder: (context) {
                                      return new JinShenShenHePage();
                                    }));
                                  },
                                ),
                                offstage: is_upgrade == "N",
                              ),
                            ),
                            Container(
                              width: (MediaQuery.of(context).size.width -
                                      ScreenUtil.getInstance().setHeight(80)) /
                                  5,
                              child: GestureDetector(
                                behavior: HitTestBehavior.opaque,
                                onTap: () {
                                  Navigator.of(context).push(
                                      new MaterialPageRoute(builder: (context) {
                                    return new MyAddressPage(
                                      type: 0,
                                    );
                                  }));
                                },
                                child: Center(
                                  child: Column(
                                    children: <Widget>[
                                      Image.asset(
                                        "images/tool_e.png",
                                        scale: 1.3,
                                      ),
                                      Container(
                                        height: ScreenUtil.getInstance()
                                            .setHeight(DP_10),
                                      ),
                                      Text('收货地址',
                                          style: TextStyle(
                                              fontSize: ScreenUtil.getInstance()
                                                  .setSp(SMALL_FONT_SIZE),
                                              color: Colors.black87)),
                                    ],
                                  ),
                                ),
                              ),
                            ),
                            // Container(
                            //   width: (MediaQuery.of(context).size.width -
                            //           ScreenUtil.getInstance().setHeight(80)) /
                            //       5,
                            //   child: GestureDetector(
                            //     behavior: HitTestBehavior.opaque,
                            //     child: Center(
                            //       child: Column(
                            //         children: <Widget>[
                            //           Image.asset(
                            //             "images/tool_c.png",
                            //             scale: 1.3,
                            //           ),
                            //           Container(
                            //             height: ScreenUtil.getInstance()
                            //                 .setHeight(DP_10),
                            //           ),
                            //           Text('每日之星',
                            //               style: TextStyle(
                            //                   fontSize: ScreenUtil.getInstance()
                            //                       .setSp(SMALL_FONT_SIZE),
                            //                   color: Colors.black87)),
                            //         ],
                            //       ),
                            //     ),
                            //     onTap: () {
                            //       Navigator.of(context).push(
                            //           new MaterialPageRoute(builder: (context) {
                            //         return new EveryDayStarPage();
                            //       }));
                            //     },
                            //   ),
                            // ),
                            Container(
                              width: (MediaQuery.of(context).size.width -
                                      ScreenUtil.getInstance().setHeight(80)) /
                                  5,
                              child: GestureDetector(
                                behavior: HitTestBehavior.opaque,
                                child: Center(
                                  child: Column(
                                    children: <Widget>[
                                      Image.asset(
                                        "images/tool_f.png",
                                        scale: 1.3,
                                      ),
                                      Container(
                                        height: ScreenUtil.getInstance()
                                            .setHeight(DP_10),
                                      ),
                                      Text('联系客服',
                                          style: TextStyle(
                                              fontSize: ScreenUtil.getInstance()
                                                  .setSp(SMALL_FONT_SIZE),
                                              color: Colors.black87)),
                                    ],
                                  ),
                                ),
                                onTap: () {
                                  // Navigator.of(context).push(
                                  //     new MaterialPageRoute(builder: (context) {
                                  //   return new EveryDayStarPage();
                                  // }));
                                  Navigator.of(context).push(
                                      new MaterialPageRoute(builder: (context) {
                                    return KeFuTalkPage(
                                        url: "http://kf.0731app.cn/index/index/home?visiter_id=" +
                                            APPLIC.userInfoMap['user_msg']
                                                    ['uid']
                                                .toString() +
                                            "&visiter_name=" +
                                            "name" +
                                            "&avatar=" +
                                            APPLIC.userInfoMap['user_detail']
                                                    ['avatar']
                                                .toString() +
                                            "&business_id=1&groupid=4&special=5");
                                  }));
                                },
                              ),
                            ),
                            Container(
                              width: (MediaQuery.of(context).size.width -
                                      ScreenUtil.getInstance().setHeight(80)) /
                                  5,
                              child: GestureDetector(
                                behavior: HitTestBehavior.opaque,
                                child: Center(
                                  child: Column(
                                    children: <Widget>[
                                      Image.asset(
                                        "images/tool_g.png",
                                        scale: 0.85,
                                      ),
                                      Container(
                                        height: ScreenUtil.getInstance()
                                            .setHeight(DP_10),
                                      ),
                                      Text('升级通知',
                                          style: TextStyle(
                                              fontSize: ScreenUtil.getInstance()
                                                  .setSp(SMALL_FONT_SIZE),
                                              color: Colors.black87)),
                                    ],
                                  ),
                                ),
                                onTap: () {
                                  Navigator.of(context).push(
                                      new MaterialPageRoute(builder: (context) {
                                    return new InformNews2Page();
                                  }));
                                },
                              ),
                            ),
                            Container(
                              width: phone == "15161177235"
                                  ? 0
                                  : (MediaQuery.of(context).size.width -
                                          ScreenUtil.getInstance()
                                              .setHeight(80)) /
                                      5,
                              child:  new GestureDetector(
                                  behavior: HitTestBehavior.opaque,
                                  child: Center(
                                    child: Column(
                                      children: <Widget>[
                                        Image.asset(
                                          "images/tool_h.png",
                                          scale: 0.8,
                                        ),
                                        Container(
                                          height: ScreenUtil.getInstance()
                                              .setHeight(DP_10),
                                        ),
                                        Text(phone == "15161177235"?'':'分享APP',
                                            style: TextStyle(
                                                fontSize:
                                                    ScreenUtil.getInstance()
                                                        .setSp(SMALL_FONT_SIZE),
                                                color: Colors.black87)),
                                      ],
                                    ),
                                  ),
                                  onTap: () {
                                    Navigator.of(context).push(
                                        new MaterialPageRoute(
                                            builder: (context) {
                                      return new InviteFriend2Page();
                                    }));
                                  },
                                ),
                            ),
                          ],
                        ),
                      ),
                      Padding(
                        padding: EdgeInsets.fromLTRB(
                            0,
                            ScreenUtil.getInstance().setHeight(0),
                            0,
                            ScreenUtil.getInstance().setHeight(DP_30)),
                        child: Row(
                          children: <Widget>[
                             Container(
                              width: (MediaQuery.of(context).size.width -
                                      ScreenUtil.getInstance().setHeight(80)) /
                                  5,
                              child: GestureDetector(
                                behavior: HitTestBehavior.opaque,
                                onTap: () {
                                  Navigator.of(context).push(
                                      new MaterialPageRoute(builder: (context) {
                                    return new MyCouponPage(
                                    );
                                  }));
                                },
                                child: Center(
                                  child: Column(
                                    children: <Widget>[
                                      Image.asset(
                                        "images/tool_c.png",
                                        scale: 1.3,
                                      ),
                                      Container(
                                        height: ScreenUtil.getInstance()
                                            .setHeight(DP_10),
                                      ),
                                      Text('优惠券',
                                          style: TextStyle(
                                              fontSize: ScreenUtil.getInstance()
                                                  .setSp(SMALL_FONT_SIZE),
                                              color: Colors.black87)),
                                    ],
                                  ),
                                ),
                              ),
                            ),
                           
                          ],
                        ),
                      ),
                  
                    ],
                  ),
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }

  @override
  void dispose() {
    super.dispose();
    WidgetsBinding.instance.removeObserver(this); //销毁观察者
  }

  @override
  bool shouldReclip(CustomClipper<Path> oldClipper) {
    return false;
  }
}
